const express = require('express')
const app = express()

const mw1 = (req, res, next) => {
  console.log('第一个中间件');
  next()
}
const mw2 = (req, res, next) => {
  console.log('第二个中间件');
  next()
}
app.use(mw1)
app.use(mw2)

app.get('/test', (req, res) => {
  res.send('get test')
})

app.listen(8089, () => {
  console.log('服务器已启动');
})